<div class="modal-header">
    <h3 class="modal-title">资源信息</h3>
</div>
<div class="modal-body">
    <form class="form-horizontal">
        <div class="form-group">
            <label class="col-lg-4 control-label"><span style="color: #ec2121;">*</span>资源组</label>
            <div class="col-lg-8">
                <ui-select multiple class="form-control" ng-model="resourceGroup.selected" theme="bootstrap" sortable="true" close-on-select="false">
                    <ui-select-match placeholder="搜索资源组名称......">{{$item.groupCode + " - " + $item.groupDesc}}</ui-select-match>
                    <ui-select-choices refresh="queryGroup($select.search)" refresh-dalay="0" repeat="item in resourceGroupList | filter: $select.search">
                        <div ng-bind-html="item.groupCode | highlight: $select.search"></div>
                        <small>
                            组描述: {{item.groupDesc}}
                        </small>
                    </ui-select-choices>
                </ui-select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg-4 control-label"><span style="color: #ec2121;">*</span>资源名称</label>
            <div class="col-lg-8">
                <input type="text" class="form-control" placeholder="资源名称" ng-model="resource.resourceName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg-4 control-label">资源描述</label>
            <div class="col-lg-8">
                <input type="text" class="form-control" placeholder="资源描述" ng-model="resource.resourceDesc">
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg-4 control-label">鉴权</label>
            <div class="col-lg-8">
                <select class="form-control" ng-model="resource.needAuth" ng-options="auth.code as auth.name for auth in authType">
                    <option value="">---请选择---</option>
                </select>
            </div>
        </div>
        <div class="form-group" style="text-align: center;">

            <button ng-click="saveData()"
                    class="btn btn-xs"
                    style="margin-left: 5px; background-color: #2e6da4; color: white;">
                <span class="glyphicon glyphicon-edit"></span>保存</button>

            <button ng-click="closeModal()"
                    class="btn btn-xs"
                    style="margin-left: 5px; background-color: red; color: white;">
                <span class="glyphicon glyphicon-remove"></span>关闭</button>

            <!--<button class="btn btn-primary btn-sm" ng-click="saveData()">保存</button>-->
            <!--<button class="btn btn-default btn-sm" ng-click="closeModal()" style="margin-left: 20px;">关闭</button>-->
        </div>
    </form>
    <div ng-if="alert.type != ''">
        <div uib-alert ng-class="'alert-' + alert.type" close="closeAlert()">{{alert.msg}}</div>
    </div>
</div>